document.onready=function(){
	$('#search').after('<span style="color:red;cursor:pointer;border:1px solid #999;padding:2px;background:#efefef;" id="export_report">Export Report!</span>&nbsp;&nbsp;<span style="color:red;cursor:pointer;border:1px solid #999;padding:2px;background:#efefef;" id="print_report">Print</span>')
	$('form[name="searchForm"]').after("<form action='/report_export/' method='post' id='post_report'><input type='hidden' name='d' value=''/><input type='hidden' name='t' value=''/></form>")
	$('#export_report').click(function(){
		var export_tit = $('#report_title').text()+'_'+$('#report_start').text().replace(',','_')
		var export_con = $('#conreturn').html()
		var url = '/report_export/'
		$('form#post_report').attr('action',url)
		$('form#post_report input[name="d"]').val(export_con)
		$('form#post_report input[name="t"]').val(export_tit)
		$('form#post_report').submit()
	})

	$('#print_report').click(function(){
		if(window.print){
			var content = $('#conreturn').html()
			var css = "<style>td{padding:2px;border:1px dotted #333;}th{background:#FFFFCD;border:1px dotted #333;padding:2px;}.selectdate{width:auto;float:left;padding:3px;background:#fff;border:1px dotted #333;margin:2px;cursor:pointer;}.selectdate:hover{background:#defdef;}</style>"
			//document.body.innerHTML='<center>'+css+content+'</center>'
			var windowopen = window.open()
			windowopen.document.write('<center>'+css+content+'</center>');
			windowopen.print();
			//window.history.go(0);
		}
	})
}
var school = {
	'3':['Stanford Financial Engineering Program','Stanford University'],
	'4':['UNC Charlotte MBA','UNC Charlotte'],
	'5':['UMT BBA Top-Up','University of Management and Technology'],
	'6':['UMT MBA Program','University of Management and Technology'],
	'7':['UIU MBA Program',''],
	'8':['Advanced Project Management Program','Stanford University'],
	'9':['UMT DBA Program','University of Management and Technology'],
	'10':['Harvard Negotiation Program','Harvard University'],
	'15':['UMT BSCS Top-Up','University of Management and Technology'],
	'16':['Iowa International MBA','The University of Iowa'],
	'17':['Stanford Senior Executive Leadership Program','Stanford University'],
	'18':['UC Berkeley Summer Select Program','University of California, Berkeley'],
	'19':['Contacts of Schools in HK','University of California, Berkeley'],
	'20':['Strategic Decision & Risk Mgt Program','Stanford University'],
	'21':['UC Berkeley Advanced Placement Program','University of California, Berkeley'],
	'23':['Iowa Applied Statistics Program','The University of Iowa'],
	'24':['Bond Trust','Stanford University'],
	'25':['Stanford Venture Capital Program','Stanford University'],
	'26':['For corporate contacts','']
}